package com.geekstudy.week6;


public class Week6Work1 {

    interface NumberValue {

        int num();

        //int operation(int v1, int v2);
    }

    interface OperationOneValue {

        int operation(int v);

    }

    interface OperationTwoValue {

        int operation(int v1, int v2);

    }





    public static void main(String[] args) {
       NumberValue num1 = () -> 5;
       int value1 = num1.num();
       System.out.println("value1:" + value1);

       OperationOneValue oneValue1 = (a) -> a + 10;
       OperationOneValue oneValue2 = (a) -> a * 2;
       int value2_1 = oneValue1.operation(3);
       int value2_2 = oneValue2.operation(3);
       System.out.println("value2_1:" + value2_1 + "  value2_2:" + value2_2);

       OperationTwoValue twoValue1 = (a, b) -> a + b;
       OperationTwoValue twoValue2 = (a, b) -> a * b;
       int value3_1 = twoValue1.operation(2, 9);
       int value3_2 = twoValue2.operation(2, 9);
       System.out.println("value3_1:" + value3_1 + "  value3_2:" + value3_2);


    }
}
